﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http.Controllers;
using System.Web.Http.Filters;
using YouWei.Utility;
using YouWei.Utility.Logging;

namespace YouWei.Api.Filters
{
    /// <summary>
    /// 行为日志
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false)]
    public class APIActionFilterAttribute: ActionFilterAttribute
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="actionContext"></param>
        public override void OnActionExecuting(HttpActionContext actionContext)
        {
            //Log4netLog.Info(new ActionLog()
            //{
            //    ClientIP = IPHelper.IPAddress,
            //    CreatedDate = DateTime.Now,
            //    RequestUrl = actionContext.Request.RequestUri.PathAndQuery,
            //    Platform = 3
            //});
            base.OnActionExecuting(actionContext);
        }
    }
}